9c64f9
@@ -43,6 +43,7 @@
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.sql.SQLWarning;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -797,15 +798,24 @@
private boolean execute(String line, boolean call, boolean entireLineAsCommand)
     }
 
     line = line.trim();
-    String[] cmds;
+    List<String> cmdList = new ArrayList<String>();
     if (entireLineAsCommand) {
-      cmds = new String[1];
-      cmds[0] = line;
+      cmdList.add(line);
     } else {
-      cmds = line.split(";");
+      StringBuffer command = new StringBuffer();
+      for (String cmdpart: line.split(";")) {
+        if (cmdpart.endsWith("\\")) {
+          command.append(cmdpart.substring(0, cmdpart.length() -1)).append(";");
+          continue;
+        } else {
+          command.append(cmdpart);
+        }
+        cmdList.add(command.toString());
+        command.setLength(0);
+      }
     }
-    for (int i = 0; i < cmds.length; i++) {
-      String sql = cmds[i].trim();
+    for (int i = 0; i < cmdList.size(); i++) {
+      String sql = cmdList.get(i).trim();
       if (sql.length() != 0) {
         if (beeLine.isComment(sql)) {
           //skip this and rest cmds in the line
